package com.ruoyi.service.impl;
import com.ruoyi.domain.CategoryThree;
import com.ruoyi.mapper.CategoryThreeMapper;
import com.ruoyi.service.ICategoryThreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryThreeServiceImpl implements ICategoryThreeService {
    @Autowired
    private CategoryThreeMapper categoryThreeMapper;

    @Override
    public List<CategoryThree> list() {
        return categoryThreeMapper.selectList();
    }

    @Override
    public List<CategoryThree> listForPage(CategoryThree categoryThree) {
        return categoryThreeMapper.selectListForPage(categoryThree);
    }

    @Override
    public CategoryThree getById(Long id) {
        return categoryThreeMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(CategoryThree categoryThree) {
        return categoryThreeMapper.insertSelective(categoryThree);
    }

    @Override
    public int updateById(CategoryThree categoryThree) {
        return categoryThreeMapper.updateByPrimaryKeySelective(categoryThree);
    }

    @Override
    public int removeByIds(Long[] ids) {
        return categoryThreeMapper.deleteByPrimaryKeys(ids);
    }
}
